import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.remote.DesiredCapabilities;


public class WebFactory {

    private WebDriver driver;

    public WebFactory(WebDriver driver) {
        this.driver = driver;
    }

    public WebDriver createNewDriver() {
        DesiredCapabilities capab = DesiredCapabilities.firefox();
        capab.setCapability(FirefoxDriver.PROFILE, true);
        driver = new FirefoxDriver(capab);
        driver.manage().window().maximize();
        return driver;
    }


}
